package com.sunday.minio.entity;

import io.minio.ObjectWriteResponse;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

/**
 * 批量写入响应
 *
 * @author zsy
 * @since 2023/10/16
 */
@Data
@AllArgsConstructor
public class BatchWriteResponse {

    private ObjectWriteResponse objectWriteResponse;

    /**
     * 和请求的附件顺序保持一致
     */
    private List<BaseResult> baseResults;

    public static BatchWriteResponse of(ObjectWriteResponse objectWriteResponse, List<BaseResult> baseResults) {
        return new BatchWriteResponse(objectWriteResponse, baseResults);
    }

}
